Optimal. Leaf size=224 \[ -\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {\left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}-\frac {a \left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^3 (a+b)^2 d}+\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3068, 3138,
2719, 3081, 2720, 2884} \begin {gather*} -\frac {\left (-3 a^2 B+a A b+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 d \left (a^2-b^2\right )}+\frac {a (A b-a B) \sin (c+d x) \sqrt {\cos (c+d x)}}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}+\frac {\left (-3 a^3 B+a^2 A b+4 a b^2 B-2 A b^3\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d \left (a^2-b^2\right )}-\frac {a \left (-3 a^3 B+a^2 A b+5 a b^2 B-3 A b^3\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 d (a-b) (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3068
Rule 3081
Rule 3138
Rubi steps
\begin {align*} \int \frac {\cos ^{\frac {3}{2}}(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^2} \, dx &=\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}-\frac {\int \frac {-\frac {1}{2} a (A b-a B)+b (A b-a B) \cos (c+d x)+\frac {1}{2} \left (a A b-3 a^2 B+2 b^2 B\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \frac {\frac {1}{2} a b (A b-a B)+\frac {1}{2} \left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) \cos (c+d x)}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{b^2 \left (a^2-b^2\right )}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 b^3 \left (a^2-b^2\right )}-\frac {\left (a \left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (a+b \cos (c+d x))} \, dx}{2 b^3 \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {\left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right ) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^3 \left (a^2-b^2\right ) d}-\frac {a \left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^3 (a+b)^2 d}+\frac {a (A b-a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 12.77, size = 280, normalized size = 1.25 \begin {gather*} \frac {-\frac {4 a (-A b+a B) \sqrt {\cos (c+d x)} \sin (c+d x)}{\left (a^2-b^2\right ) (a+b \cos (c+d x))}+\frac {\frac {2 \left (a A b+a^2 B-2 b^2 B\right ) \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}+\frac {8 (-A b+a B) \left ((a+b) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-a \Pi \left (\frac {2 b}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{a+b}+\frac {2 \left (-a A b+3 a^2 B-2 b^2 B\right ) \left (-2 a b E\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 a (a+b) F\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+\left (-2 a^2+b^2\right ) \Pi \left (-\frac {b}{a};\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right ) \sin (c+d x)}{a b^2 \sqrt {\sin ^2(c+d x)}}}{(a-b) (a+b)}}{4 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(848\) vs.
\(2(300)=600\).
time = 0.68, size = 849, normalized size = 3.79
method | result | size |
default | \(\text {Expression too large to display}\) | \(849\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^{3/2}\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________